<div apes-form [formGroup]="form" class="{{prefixCls}}">

  <div apes-row [apesGutter]="8">
    <div apes-col [apesMd]="24">

      <div *ngIf="isDownloading" class="download-loading">
        <div class="download-loading-progress">
          <div>数据下载中请稍后<apes-spin style="display: inline-block" apesSimple></apes-spin></div>
          <apes-progress
            [apesPercent]='percent'
            [apesStrokeColor]="{ '0%': '#108ee9', '100%': '#87d068' }"
            apesStatus="active"
          ></apes-progress>
        </div>
      </div>


      <div *ngIf="showCondition==true" apes-row class="apes-item" style="padding: 16px; margin-bottom: 0;">
        <formly-form [model]="model" [fields]="searchFormMetadata.conditionField" [options]="options" [form]="form"></formly-form>
      </div>
      <div *ngIf="treeData==true" style="padding:16px;">
        <input apes-input type="search"
               style="width:100%"
               formControlName="quickSearchInput"
               type="text"
               id="filter-text-box"
               placeholder="本地快速查找..."
               (input)="onFilterTextBoxChanged()"
               (keyup)="onFilterTextBoxChanged()"
               (click)="onFilterTextBoxChanged()">
      </div>
      <ag-grid-angular
        #grid
        style="width: 100%; margin-bottom: 10px;" class="ag-theme-balham"
        enableColResize="true"
        enableSorting="false"
        enableFilter="false"
        suppressLoadingOverlay="true"
        suppressNoRowsOverlay="true"
        suppressContextMenu="true"
        [modules]="modules"
        [rowData]="rowData"
        [gridOptions]="gridOptions"
        [columnDefs]="searchFormMetadata.columnDefs"
        [rowSelection]="searchFormMetadata.rowSelection"
        [animateRows]="true"
        [autoGroupColumnDef]="autoGroupColumnDef"
        [rowModelType]="rowModelType"
        [treeData]="treeData"
        [getDataPath]="getDataPath"
        (rowClicked)="onRowClick($event)"
        (selectionChanged)="onSelectionChanged()"
        (gridReady)="onGridReady($event)">
      </ag-grid-angular>
      <div *ngIf="treeData!==true"  class="apes-paging">
        已加载{{loadingTotal}}行，总行数{{pagination.total}}
      </div>
    </div>
  </div>


</div>
